home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / tktdoc / unix2dvx.doc < prev    next >
Encoding:
Text File  |  1994-08-11  |  8.9 KB  |  233 lines

  1. CHANGES FROM UNIX X TO DESQVIEW/X
  2.  
  3. Because of the differences in operating systems, the DESQview/X implementation
  4. of the X Window System varies from the UNIX implementation. The primary
  5. areas of difference are explained in this chapter
  6.  
  7. Directory Structure
  8.  
  9. In DESQview/X, all X Window System files are relative to the directory
  10. into which DESQview/X has been installed. Clients, Demos and Include
  11. files are all located under the DESQview/X directory. Library files
  12. reside in \DVX\LIB\<compiler directory>. Bitmap files can be found
  13. in \DVX\include\X11\bitmaps.
  14.  
  15. Resource Handling
  16.  
  17. Under UNIX, X Window System Resource files are usually the client
  18. name. Under DESQview/X, an extension of '.res' has been added. e.g.,
  19. Xeyes becomes Xeyes.res.
  20.  
  21. Application default resource files are located in the app-defa
  22. directory off the main DESQview/X directory and have an extension
  23. of .res. For example, the Xeyes resource file would be \DVX\app-defa\Xeyes.res
  24. by default.
  25.  
  26. User default resource files are searched for in the home directory.
  27. This home directory is taken to be the directory into which DESQview/X
  28. has been installed, unless a HOME environment variable is set, e.g.
  29. .Xdefaults has been changed to \DVX\Xdefault.res, or HOME\Xdefault.res.
  30.  
  31. Filename Changes
  32.  
  33. Due to limitations of the DOS file system, some filenames have been
  34. changed. The resource filenames have been altered as described above.
  35. In addition, some bitmap and header files have been renamed. While
  36. DOS truncates long filenames to eight characters with a three character
  37. extension, there are some cases where the first eight characters of
  38. files are identical. In these cases, one of the filenames had to be
  39. altered.
  40.  
  41. The following is a list of altered filenames which are taken from
  42. the UNIX2DVX.TXT file:
  43.  
  44. ! This is the file used by UNIX2DVX
  45. ! it contains the differences in the format  UNIX : DOS
  46. ! Any line preceded by an exclamation point (!) will be
  47. ! ignored. Blank lines are also ignored.
  48. !
  49. ! Xt Header file name differences
  50.  
  51. X11/Intrinsic.h      :     X11/Intrinsc.h
  52. X11/IntrinsicI.h     :     X11/Intrinsi.h
  53. X11/IntrinsicP.h     :     X11/IntrinsP.h
  54. X11/CompositeI.h    :     X11/ComposiI.h
  55. X11/CompositeP.h    :     X11/ComposiP.h
  56. X11/ConstrainP.h    :     X11/ConstraP.h
  57.  
  58. ! Xaw
  59. X11/Xaw/AsciiSinkP.h    :    X11/Xaw/asciisip.h
  60. X11/Xaw/AsciiSrcP.h    :    X11/Xaw/asciisrp.h
  61. X11/Xaw/AsciiTextP.h    :    X11/Xaw/asciitep.h
  62. X11/Xaw/MenuButtoP.h    :    X11/Xaw/menubutp.h
  63. X11/Xaw/PortholeP.h    :    X11/Xaw/portholp.h
  64. X11/Xaw/RepeaterP.h    :    X11/Xaw/repeatep.h
  65. X11/Xaw/ScrollbarP.h    :    X11/Xaw/scrollbp.h
  66. X11/Xaw/SimpleMenP.h    :    X11/Xaw/simplemp.h
  67. X11/Xaw/StripCharP.h    :    X11/Xaw/stripchp.h
  68. X11/Xaw/TemplateP.h    :    X11/Xaw/templatp.h
  69. X11/Xaw/TextSinkP.h    :    X11/Xaw/textsinp.h
  70. X11/Xaw/ViewportP.h     :    X11/Xaw/viewporp.h
  71.  
  72. ! bitmap file name differences
  73. bitmaps/cntr_ptrmsk     :    bitmaps/cntr_ptr.msk
  74. bitmaps/left_ptrmsk     :    bitmaps/left_ptr.msk
  75. bitmaps/mailemptymsk    :    mailempty.msk
  76. bitmaps/mailfillmsk     :    mailfill.msk
  77. bitmaps/right_ptrmsk    :    right_ptr.msk
  78. bitmaps/opendotMask     :    opendot.Mas
  79. bitmaps/starMask     :    star.Mas
  80.  
  81. ! Motif file name changes
  82. Xm/BaseClassP.h    :    Xm/BaseClaP.h
  83. Xm/BulletinBP.h    :    Xm/BulletBP.h
  84. Xm/CascadeBG.h    :    Xm/CascadBG.h
  85. Xm/CascadeBGP.h    :    Xm/CascaBGP.h
  86. Xm/CascadeBP.h    :    Xm/CascadBP.h
  87. Xm/CutPasteP.h    :    Xm/CutPastP.h
  88. Xm/DialogSEP.h    :    Xm/DialoSEP.h
  89. Xm/DragIconP.h    :    Xm/DragIcoP.h
  90. Xm/DragOverSP.h    :    Xm/DragOvSP.h
  91. Xm/DrawingAP.h    :    Xm/DrawinAP.h
  92. Xm/DropSMgrI.h    :    Xm/DropSMgI.h
  93. Xm/DropSMgrP.h    :    Xm/DropSMgP.h
  94. Xm/DropTransP.h    :    Xm/DropTraP.h
  95. Xm/MenuShellP.h    :    Xm/MenuSheP.h
  96. Xm/MessageBP.h     :    Xm/MessagBP.h
  97. Xm/MessagesI.h    :    Xm/MessagsI.h
  98. Xm/ProtocolsP.h    :    Xm/ProtocoP.h
  99. Xm/RowColumnP.h    :    Xm/RowColuP.h
  100. Xm/ScrollBarP.h    :    Xm/ScrollBP.h
  101. Xm/ScrolledWP.h    :    Xm/ScrollWP.h
  102. Xm/SelectioBP.h    :    Xm/SelectBP.h
  103. Xm/SeparatoG.h    :    Xm/SeparatG.h
  104. Xm/SeparatoGP.h    :    Xm/SeparaGP.h
  105. Xm/SeparatorP.h    :    Xm/SeparatP.h
  106. Xm/TearOffBP.h    :    Xm/TearOfBP.h
  107. Xm/TextFSelP.h    :    Xm/TextFSlP.h
  108. Xm/TextStrSoP.h    :    Xm/TextStSP.h
  109. Xm/ToggleBGP.h    :    Xm/TogglBGP.h
  110. Xm/TransltnsP.h    :    Xm/TransltP.h
  111. Xm/VirtKeysP.h    :    Xm/VirtKeyP.h
  112.  
  113. DOS filenames are limited to a length of eight characters
  114. with a three character extension.
  115.  
  116. Because there are cases where two or more files had
  117. identical names under DOS, some filenames had to be altered to prevent
  118. files from being overwritten.
  119.  
  120. A list of truncated filenames can be found above.
  121.  
  122. The UNIX2DVX.EXE Utility
  123.  
  124. When porting programs from UNIX to DOS, it is tedious to manually
  125. alter truncated header file names in source code. The UNIX2DVX program
  126. is provided to automate the process of replacing header file names
  127. with their truncated equivalent.
  128.  
  129. Unix2dvx consists of the executable (UNIX2DVX.EXE) and two ASCII text
  130. files, unix2dvx.txt, and wrapper.txt. The first text file, unix2dvx.txt
  131. is a list of all the header file names which have been changed, and
  132. what they have been changed to.  Any line with an exclamation point
  133. (!) as its first character is ignored as a comment.
  134.  
  135. The changes are in the format :
  136.  
  137. oldheadername : newheadername
  138.  
  139.  
  140.  
  141. Any whitespace on the line is ignored, and the two header names must
  142. be separated by a colon (:). The header file names must be complete,
  143. so to replace any occurences of X11/IntrinsicI.h, you must specify
  144. the following line,
  145.  
  146. X11/IntrinsicI.h     :X11/IntrinsI.h
  147.  
  148. The default unix2dvx.txt file contains all the changes to the standard
  149. X11R5 header files, but it can be altered by the user to include any
  150. other header files they wish.
  151.  
  152. The second file, wrapper.txt, contains the text that will be included
  153. at the point where a header file to be replaced is found. Again, any
  154. line preceded by an exclamation point is ignored as a comment. Unix2dvx
  155. does not simply do a search and replace on all the listed header files,
  156. but instead inserts the requested text at the required points in the
  157. code. By default, this text inserts the following :
  158.  
  159. #ifdef MSDOS
  160. #include "$MSDOSNAME"           /* QDK $DATE $TIME */
  161. #else
  162. #include "$UNIXNAME"
  163. #endif
  164.  
  165. $MSDOSNAME and $UNIXNAME resolve to the header name to be replaced,
  166. and its new truncated name respectively, and date and time are replaced
  167. by the current date and time extracted from the system. With this
  168. configuration, when compiling under DOS, simply define MSDOS at compile
  169. time. This text could simply be replaced by :
  170.  
  171. #include "$MSDOSNAME"
  172.  
  173. This would result in a straight substitution of the header file names.
  174.  
  175. Upon startup the executable (UNIX2DVX.EXE) first reads in the changes
  176. file, and checks it for simple syntax errors. This file default may
  177. be overridden by using the parameter -c=xxx.ext. If no path or drive
  178. is specified, the current directory is first searched, and then the
  179. directory of UNIX2DVX.EXE is searched. If no extension is provided,
  180. the default ".TXT" is used. The next file read is the wrapper
  181. text file. Again this may be overridden, using the -w=xxx.ext. The
  182. same search conditions apply as to the changes file.
  183.  
  184. Wild cards are acceptable (*,?) in the input file spec. UNIX2DVX.EXE
  185. searches through the file, looking for #include statements, and then
  186. compares their contents to the list it read in from the unix2dvx.txt
  187. file. If it matches one, it then checks to see if it is contained
  188. within a conditional compiler statement already and compares the text
  189. surrounding the include statement to the wrapper insertion text read
  190. in from wrapper.txt.
  191.  
  192. If both of these check out, it then inserts the appropriate text at
  193. that position.
  194.  
  195. Note, any comments on the original line will be moved
  196. to below the wrapper text insertion in the processed file.
  197.  
  198. When preprocessing is finished, the original file is renamed to a  .BAK
  199. (in case you require it). All changes and warnings are written to
  200. stdout, and so may be redirected to a file.
  201.  
  202. Command line switches
  203.  
  204. Note : all switches may begin with either a '/' or a
  205. '-', they are not case sensitive, and may appear in any position and
  206. order on the command line.
  207.  
  208. -?, -h[elp]: Provides a list of all switches and a brief description
  209. of each.
  210.  
  211. -c=xxx.ext: Selects new changes file (discussed above).
  212.  
  213. -w=xxx.ext: Selects new wrapper file (discussed above).
  214.  
  215.  -l: Lists on screen the changes that would be made, does not
  216. alter the input file.
  217.  
  218. -i: Ignore Case. This will affect the comparisons between the
  219. header files in the source, and the list of files to be replaced in
  220. unix2dvx.txt (e.g. x11/IntrinsicI.h and X11/IntrinsicI.h will not
  221. match normally -- they will with this option.) This also affects
  222. the comparison between the wrapper text and the source file.
  223.  
  224. -nw: No Wrapper check. Unix2dvx will not compare the wrapper
  225. text to the lines surrounding the #include in the source, to see if
  226. it has been previously preprocessed.
  227.  
  228. -d=val: Set allowed depth of nested ifdefs. Normally, this defaults
  229. to zero, meaning if a header file which should be replaced is contained
  230. within a conditional statement, it will not be replaced.  In some
  231. modules, and header files, this may need to be changed, because the
  232. entire code could be contained within an ifdef statement.
  233.